package marchsoft.modules.four.h5.controller;

import marchsoft.base.PageVO;
import marchsoft.modules.four.common.entity.StudyData;
import marchsoft.modules.four.h5.service.Impl.HomeServiceImpl;
import marchsoft.modules.four.h5.service.Impl.StudyCaseServiceImpl;
import marchsoft.response.Result;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
@RestController//声明bean
@RequestMapping("/api/h5")//控制访问指向
public class StudyCaseController {
    private final StudyCaseServiceImpl studyCaseService;
    public StudyCaseController(StudyCaseServiceImpl studyCaseService) {
        this.studyCaseService=studyCaseService;
    }

    @GetMapping("/eStudyData/frontAll")
    public Result<List<StudyData>> eStudyDataFront22222222 (String safeTypeId, PageVO pageVO){
        return Result.success(studyCaseService.getEStudyDataFront1(Long.parseLong(safeTypeId)));
    }
}
